<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <Button-Counter></Button-Counter>
    </div>

    <script src="../js/vue.js"></script>

    <script>
      const app = Vue.createApp({
        data() {
          return {
            msg: ""
          }
        }
      });
      app.component('button-counter', {
        data(){
          return {
            count: 0,
          }
        },
        template:`
        <button @click="count++">
          您点击了{{count}}次  
        </button>
        `,
      });

      //挂载实例
      app.mount('#app');
    </script>
  </body>
</html>